home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
catn
/
split.n
< prev
next >
Wrap
Text File
|
1994-09-20
|
1KB
|
67 lines
split(n) Tcl Built-In Commands
_________________________________________________________________
NAME
split - Split a string into a proper Tcl list
SYNOPSIS
split _s_t_r_i_n_g ?_s_p_l_i_t_C_h_a_r_s?
_________________________________________________________________
DESCRIPTION
Returns a list created by splitting _s_t_r_i_n_g at each character
that is in the _s_p_l_i_t_C_h_a_r_s argument. Each element of the
result list will consist of the characters from _s_t_r_i_n_g that
lie between instances of the characters in _s_p_l_i_t_C_h_a_r_s.
Empty list elements will be generated if _s_t_r_i_n_g contains
adjacent characters in _s_p_l_i_t_C_h_a_r_s, or if the first or last
character of _s_t_r_i_n_g is in _s_p_l_i_t_C_h_a_r_s. If _s_p_l_i_t_C_h_a_r_s is an
empty string then each character of _s_t_r_i_n_g becomes a
separate element of the result list. _S_p_l_i_t_C_h_a_r_s defaults to
the standard white-space characters. For example,
split "comp.unix.misc" .
returns "comp unix misc" and
split "Hello world" {}
returns "H e l l o { } w o r l d".
KEYWORDS
list, split, string
Tcl 1